<?php
class Control_Article_Menu extends QUI_Control_Abstract {
    function render() {
        //        return '';
        $groups = Department::find()->all()->query();

        $column = Column::find('col_id = ?', FUNC::getV('col_id'))->one()->query();
        FUNC::getParent(Column::getFormCache(), FUNC::getV('col_id'), $parents, array('col_id'), false);    //查找父亲
        //        $parents[] = FUNC::getV('col_id');
        FUNC::formatArrayKey($parents);
        //        dump($parents);
        //        dump(Column::getFormCache(null, FUNC::getV('col_id')));
        //        echo 'kkk<br />';
        //        dump($column->getConfig($column->parent_id));
        //        dump($column);
        //dump();
        //        echo 'kkk<br />';
        //        $str = '';
        //        foreach($groups as $key => $group) {
        //            $str .= '<li>' .$group->name. '</li>';
        //        }
        //        return '部门：'. $str;
        $this->_view['parents'] = $parents;
        $this->_view['groups'] = $groups;
        return $this->_fetchView('view:' .Helper_Common::currentStyle(). '/_control/'.$column->getConfig($column->parent_id)->template['menu']);
    }

}
?>